import 'package:bike_ride/common/util/hysize_fit.dart';
import 'package:bike_ride/generated/l10n.dart';
import 'package:flutter/material.dart';

///地图中间遥感样式
class LocationPinWidget extends StatelessWidget {
  final bool showText;
  const LocationPinWidget({Key? key, this.showText = false}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return IgnorePointer(
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          if(showText)
            Container(
              padding: EdgeInsets.symmetric(vertical: 4.rpx,horizontal: 10.rpx),
              margin: EdgeInsets.only(bottom: 4.rpx),
              decoration: BoxDecoration(
                color: Colors.black45,
                borderRadius: BorderRadius.circular(20.rpx),
              ),
              child: Text(S.current.loginToFindVehicle,style: TextStyle(color: Colors.white,fontSize: 22.rpx),),
            ),

          Image.asset(
            'assets/images/icon_location_new.png',
            width: 36.rpx,
            height: 64.rpx,
            // alignment: Alignment.topCenter,
            fit: BoxFit.cover,
          ),
        ],
      ),
    );
  }
}
